Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix some bugs with PDF imports #12297

Merged
merged 5 commits into from
Dec 23, 2024
Merged

Fix some bugs with PDF imports #12297

merged 5 commits into from
Dec 23, 2024

Conversation

InAnYan
Copy link
Collaborator

@InAnYan InAnYan commented Dec 16, 2024

Some bugs:

  • Several steps of PDF import didn't work because of relativization. I removed it, but IDK if it's okay to do this. After that, all steps worked.
  • When searching for unlinked files, PDF import didn't work at all.
  • There was some bug when importing specific PDF files, when algorithm can't find title of the book. I replaced String to Optional<String> and import worked correctly.
  • NEW: replaced files to List.of(file) in ImportHandler.

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • [?] Change in CHANGELOG.md described in a way that is understandable for the average user (if change is visible to the user)
    - [ ] Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
    - [ ] Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@InAnYan
Copy link
Collaborator Author

InAnYan commented Dec 18, 2024

I also changed log messages as IntelliJ warned that they look like duplicates. Just in case)

@InAnYan
Copy link
Collaborator Author

InAnYan commented Dec 23, 2024

Oh, I forgot about this PR (I have 2 PRs related to PDFs)

This PR can be reviewed 😄

@InAnYan
Copy link
Collaborator Author

InAnYan commented Dec 23, 2024

image

Accidentally found is commit about relativization. But I haven't looked it yet

@InAnYan
Copy link
Collaborator Author

InAnYan commented Dec 23, 2024

image

Huh, and this too.

The thing is, currently (not in this PR), search for unlinked files doesn't perform any PDF analysis, and files are just left Misc.

This PR fixes this behavior. One way of fixing - remove relativization

@Siedlerchr
Copy link
Member

Regarding relativie stuff, after pdf import is done, are the files in general relative now?

@InAnYan
Copy link
Collaborator Author

InAnYan commented Dec 23, 2024

Regarding relativie stuff, after pdf import is done, are the files in general relative now?

Forwarding from Skype:

fresh unsaved library - absolute path
new library in the dir of pdf - relative path + copy with rename
library in upper directory of pdf dir - relative path + copy with rename

@Siedlerchr Siedlerchr added this pull request to the merge queue Dec 23, 2024
Merged via the queue into JabRef:main with commit d4624f7 Dec 23, 2024
23 checks passed
@Siedlerchr Siedlerchr deleted the fix/pdf-import branch December 23, 2024 15:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants